﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MaterialStorage.Model
{
    /// <summary>
    /// 存储情况
    /// </summary>
    public class Storage
    {
        /// <summary>
        /// 编号
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 材料编号
        /// </summary>
        public int MaterialId { get; set; }
        /// <summary>
        /// 相关材料
        /// </summary>
        public Material Material { get; set; }
        /// <summary>
        /// 入库数量
        /// </summary>
        public int InQuantity { get; set; }
        /// <summary>
        /// 出库数量
        /// </summary>
        public int OutQuantity { get; set; }
        /// <summary>
        /// 剩余数量
        /// </summary>
        public int ReleaseQuantity { get; set; }

        public Storage()
        {
            this.Id = int.MinValue;
            this.InQuantity = int.MinValue;
            this.MaterialId = int.MinValue;
            this.OutQuantity = int.MinValue;
            this.ReleaseQuantity = int.MinValue;
        }

        public List<dynamic> GetList(DavidDB.ADO.DBManager db)
        {
            var query = db.GetList(new Storage()).ToList();
            return query;
        }



    }
}
